<template>
    <a-config-provider :locale="zhCN">
        <a-tabs v-model:activeKey="activeKey" centered>
            <a-tab-pane v-for="(i, index) in 5" :key="i" :tab="'Tab' + index">
                <component :is="components[index]" />
            </a-tab-pane>
        </a-tabs>
    </a-config-provider>
</template>

<script lang="ts" setup>
import zhCN from 'ant-design-vue/es/locale/zh_CN';
import Tab0 from './components/Tab0.vue'
import Tab1 from './components/Tab1.vue'
import Tab2 from './components/Tab2.vue'
import Tab3 from './components/Tab3.vue'
import Tab4 from './components/Tab4.vue'
const activeKey = ref(1);
const components = [Tab0, Tab1, Tab2, Tab3, Tab4]
</script>

<style lang="scss" scoped>
.ant-tabs {
    height: 100%;
}

:deep(.ant-tabs-content-holder) {
    overflow: auto;
}
</style>